The present invention relates to a process roll-in system for an information processing apparatus and, more particularly, to control of a buffer memory of sets of visible registers in a process roll-in mode in an information processing apparatus having a multiprogram control function.
Multiple programming control for switching various programs and effectively executing them is an important basic control function in an information processing apparatus using a computer. For realizing multiprogram control, a central processing unit (CPU) of an information processing apparatus carries out the processing in unit of a process. The process is set in one of the running, ready, waiting, and suspend states. A process of the highest priority is selected from a queue of a plurality of ready processes by the CPU and the corresponding process is executed thereby. More specifically, the running process is set in the waiting state while the process requests an input/output operation and waits for completion of the input/output operation, so that the CPU can be occupied by another ready process. Upon completion of the input/output operation, the waiting process becomes ready and is added to the queue of the ready processes. The priority of this ready process is compared with that of the currently running process. If necessary, the currently running process is replaced with the ready process.
When the running process is set in the waiting state and the CPU is occupied by another process, or when the priority of the process added to the queue of the ready processes is higher than that of the currently running process, a process replacement (called process swapping) is performed.
In a conventional information processing apparatus having a multiprogram control function, the number of visible registers such as instruction counters or various arithmetic registers is equal to that of running processes. Therefore, process swapping is performed in the following procedures. The contents of the visible registers for a running process are saved or rolled out in a saving area assigned to this process in a main memory. Thereafter, the contents of a new process to be run are loaded or rolled in the visible registers from the corresponding saving area in the main memory. At the same time, an updated queue of the ready processes is generated.
In the conventional information processing apparatus described above, data must be exchanged between the main memory and the visible registers whenever the currently running process is replaced with another one. As a result, an overhead loss occurs and the system throughput is undesirably decreased.